package net.betou.core.dao.impl;

import net.betou.common.hibernate3.HibernateBaseDao;
import net.betou.core.dao.DbFileDao;
import net.betou.core.entity.DbFile;

import org.springframework.stereotype.Repository;

@Repository
public class DbFileDaoImpl extends HibernateBaseDao< DbFile, String > implements DbFileDao{
	public DbFile findById( String id ) {
		DbFile entity = get( id );
		return entity;
	}

	public DbFile save( DbFile bean ) {
		getSession( ).save( bean );
		return bean;
	}

	public DbFile deleteById( String id ) {
		DbFile entity = super.get( id );
		if( entity != null ){
			getSession( ).delete( entity );
		}
		return entity;
	}

	@Override
	protected Class< DbFile > getEntityClass( ) {
		return DbFile.class;
	}
}